import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => {
  return {
    plugins: [vue()],
    server: {
      host: "0.0.0.0",
      port: 3306,
      proxy: {
        '/api': {
          target: 'http://192.168.0.104:3000/',
          changeOrigin: true,
          // rewrite: (p) => p.replace(new RegExp("^" + '/api'), "")
        }
      }
    }
  }
})
